Method and apparatus for path selection

ABSTRACT

Systems and techniques are described for configuring path selection in a network. The network can comprise a first router, a second router, a third router, a fourth router, and an intermediary device. The second router can be configured to use Differentiated Services Code Point (DSCP) while routing packets so that packets with a first DSCP value are routed through the third router, and packets with a second DSCP value are routed through the fourth router. The intermediary device can be configured to: (1) transparently intercept a packet forwarded by the first router to the second router, (2) determine whether the packet is to be routed through the third router or the fourth router, (3) modify a DSCP field in the packet based on said determining, and (4) forward the packet to the second router.

RELATED APPLICATION

This patent application is a divisional of, and hereby claims priorityunder 35 U.S.C. § 120 to, pending U.S. patent application Ser. No.15/367,059, which has the same inventors as this patent application, andwhich was filed on 1 Dec. 2016, the contents of which are hereinincorporated by reference in their entirety for all purposes. U.S.patent application Ser. No. 15/367,059 is a continuation of, and herebyclaims priority under 35 U.S.C §120 to, U.S. patent application Ser. No.14/450,033 (U.S. Pat. No. 9,531,624), which has the same inventors asthis patent application, and which was filed on 1 Aug. 2014, thecontents of which are herein incorporated by reference in their entiretyfor all purposes. U.S. patent application Ser. No. 14/450,033 claimsbenefit of U.S. Provisional Application Ser. No. 61/862,388, which hasthe same inventors as this patent application, and which was filed on 5Aug. 2013, the contents of which are herein incorporated by reference intheir entirety for all purposes.

BACKGROUND Technical Field

This disclosure relates to computer networking. More specifically, thisdisclosure relates to methods and apparatuses for configuring pathselection.

Related Art

Enterprise networks can include one or more wide-area networks (WANs)that interconnect offices that can be distributed over a largegeographical area. Some enterprise networks use WAN optimization devicesto improve network performance. WAN optimization devices optimizenetwork traffic to improve WAN performance in reading and/or writingdata over a network. Some WAN optimization devices monitor users'network traffic to attempt to predict data likely to be requested byusers. This predicted data is prefetched over the WAN and cached by theWAN optimization devices at the users' respective network locations, sothat this data can be quickly accessed by users if requested. WANoptimization devices also typically compress data (e.g., by performingde-duplication) to improve WAN performance. The WAN optimizationdevices' prefetching, caching, and compression helps mask the bandwidthand latency limitations of WANs from users.

WAN optimization devices may operate singly or in pairs at each side ofa WAN connection to optimize network traffic. WAN optimization devicesare referred to in the art by many different terms, including, but notlimited to, transaction accelerators, WAN optimizers, WAN optimizationcontrollers (WOCs), wide-area data services (WDS) appliances, WANtraffic optimizers (WTOs), and protocol accelerators or optimizers.

Techniques for optimizing network traffic to improve network performancein reading and/or writing data over a network are referred to in the artby many different terms, including, but not limited to, WANacceleration, transaction acceleration, transaction pipelining, protocolpipelining, request prediction, application flow acceleration, andprotocol acceleration. In this disclosure, the term “WAN optimizationdevice” is used to refer to such devices and applications and “WANoptimization” is used to refer to such techniques.

In the hunt for increased performance at lower cost, many informationtechnology (IT) organizations are creating so-called hybrid networksthat, like many of today's applications, escape the boundaries oftraditional enterprise network infrastructure. In some use cases, theprimary multi-protocol label-switching (MPLS) network might connect datacenter branches and ferry mission-critical work with higher priority,while cheaper virtual private network (VPN) and local Internet linescarry the remainder of traffic. The hybrid network is defined by itsmixed use of multiple topologies. While hybrid networks solve importantproblems, conventional systems and techniques do not enable IT andbusiness to drive and support new applications in the network andestablish service level agreements (SLAs) for each application withenough resources at every point of its lifecycle.

Specifically, in conventional approaches, lower-priority branch Internettraffic is typically backhauled along with mission-critical trafficacross expensive private networks to the data center, then thelow-priority branch Internet traffic exited from the data center to theInternet (typically through a firewall at the data center), and thereturn traffic would likewise take the circuitous route back to the enduser. In such conventional approaches, backup links are oftenunderutilized, and it is not possible to selective route web and cloudservices to the Internet directly from the branch location.

SUMMARY

Some embodiments described herein provide systems and techniques forconfiguring path selection in a network. Path selection allows anapplication to be mapped to a desired path across a hybrid network. Inparticular, with path selection, specific applications can be mapped tospecific WAN paths, and Internet traffic can be broken out right atbranch locations, thereby avoiding the branch's cloud and webapplication traffic from having to backhaul through the data center'sexpensive connections (e.g., costly MPLS pipes) and back again.Additionally, if a mission-critical application requires high networkperformance, path selection allows a network administrator to assign amission-critical application to the primary high-availability connection(e.g., an MPLS pipe) where network performance (e.g., latency,bandwidth, etc.) can be guaranteed. As yet another example, let's assumethat a mid-importance application is mapped to the VPN, but the VPNfails. Path selection enables the network to be configured so that thenetwork can quickly fail over to a backup communication channel (e.g.,an MPLS pipe). Furthermore, path selection can enable a networkadministrator to send low-priority traffic (e.g., YouTube traffic) outto the lowest-cost, lowest-priority Internet link, and send thehigher-priority traffic (e.g., traffic generated by a financialapplication) over a high-bandwidth and high-performance connection(e.g., an MPLS pipe).

In some embodiments, an intermediary device (e.g., a WAN optimizationdevice) can be located between a source device (e.g., a router) and afirst destination device (e.g., a next hop router). The intermediarydevice can transparently intercept a packet that is sent from the sourcedevice to the first destination device. Specifically, a header of thepacket can include a link layer source address associated with thesource device and a first link layer destination address associated withthe first destination device. Next, in response to determining that thepacket is to be forwarded to a second destination device (e.g., anothernext hop router) instead of the first destination device, theintermediary device can replace the first link layer destination addresswith a second link layer destination address associated with the seconddestination device, and forward (or switch or route) the packet to thesecond destination device.

In some embodiments, determining that the packet is to be forwarded tothe second destination device instead of the first destination deviceincludes determining that a path that passes through the firstdestination device has a fault. Specifically, probe packets can beperiodically sent through multiple paths, and a path can be flagged ashaving a fault if a response to a probe packet includes an error messageor if no response is received to the probe packet within a predeterminedtime period.

In some embodiments, determining that the packet is to be forwarded tothe second destination device instead of the first destination deviceincludes determining a network flow associated with the packet, anddetermining that the second destination is associated with the networkflow based on a path selection table. Specifically, the path selectiontable can be created based on a path selection policy that associates atleast two different applications with two different paths in thenetwork. For example, the packet can be analyzed to determine afingerprint associated with the packet. Next, an application associatedwith the fingerprint can be identified (e.g., by looking up a databasethat associates known fingerprints with applications). A path associatedwith the application can then be selected based on the path selectionpolicy. Next, a network flow associated with the packet can bedetermined, and an association between the network flow and the selectedpath can be stored in the path selection table.

In some embodiments, a routing table on a downstream device forwards thepacket along a first path based at least on a network layer destinationaddress in a network layer header of the packet. In response todetermining that the packet is to be forwarded along a second path thatis different from the first path, the intermediary device can modify oneor more bits in the network layer header of the packet, and forward thepacket (with the modified network layer header bits) to the downstreamdevice, thereby causing the downstream device to forward the packetalong the second path instead of the first path. In some embodiments,the intermediary device can modify Differentiated Services (DS) bits inthe Internet Protocol (IP) header, and the downstream device can beconfigured to route the packet based on the DS bits. In someembodiments, determining that the packet is to be forwarded along thesecond path instead of the first path includes determining that thefirst path has a fault. Specifically, probe packets can be periodicallysent through the first path and the second path, and the first pathand/or the second path can be flagged as having a fault if a response toa probe packet includes an error message or if no response is receivedto the probe packet within a predetermined time period.

In some embodiments, determining that the packet is to be forwardedalong a second path instead of along the first path includes determininga network flow associated with the packet, and determining that thesecond path is associated with the network flow based on a pathselection table. Specifically, the path selection table can be createdbased on a path selection policy that associates at least two differentapplications with two different paths in the network. For example, thepacket can be analyzed to determine a fingerprint associated with thepacket. Next, an application associated with the fingerprint can beidentified (e.g., by looking up a database that associates knownfingerprints with applications). A path associated with the applicationcan then be selected based on the path selection policy. Next, a networkflow associated with the packet can be determined, and an associationbetween the network flow and the selected path can be stored in the pathselection table.

In some embodiments, a network can comprise a first router, a secondrouter, a third router, a fourth router, and an intermediary device,wherein the intermediary device is interposed between the first routerand the second router, and wherein the third router and the fourthrouter are coupled to the second router. In these embodiments, thesecond router can be configured to use Differentiated Services CodePoint (DSCP) while routing packets so that packets with a first DSCPvalue are routed through the third router, and packets with a secondDSCP value are routed through the fourth router. The intermediary devicecan be configured to: (1) transparently intercept a packet forwarded bythe first router to the second router, (2) determine whether the packetis to be routed through the third router or the fourth router, (3)modify a DSCP field in the packet based on said determining, and (4)forward the packet to the second router. Modifying the DSCP field in thepacket can involve: setting the DSCP field in the packet to the firstDSCP value responsive to determining that the packet is to be routedthrough the third router, and setting the DSCP field in the packet tothe second DSCP value responsive to determining that the packet is to berouted through the fourth router.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1A illustrates an example of a network in accordance with someembodiments described herein.

FIG. 1B illustrates an example of a network in accordance with someembodiments described herein.

FIG. 2A illustrates a process for path selection in accordance with someembodiments described herein.

FIG. 2B illustrates a process for path selection in accordance with someembodiments described herein.

FIG. 3A illustrates an example of path selection in accordance with someembodiments described herein.

FIG. 3B illustrates a packet in accordance with some embodimentsdescribed herein.

FIG. 3C illustrates an example of path selection in accordance with someembodiments described herein.

FIG. 3D illustrates a packet in accordance with some embodimentsdescribed herein.

FIG. 4 illustrates an apparatus in accordance with some embodimentsdescribed herein.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the invention, and is provided in the context ofa particular application and its requirements. Various modifications tothe disclosed embodiments will be readily apparent to those skilled inthe art, and the general principles defined herein may be applied toother embodiments and applications without departing from the spirit andscope of the present invention. Thus, the present invention is notlimited to the embodiments shown, but is to be accorded the widest scopeconsistent with the principles and features disclosed herein. In thisdisclosure, when the term “and/or” is used with a list of entities, itrefers to all possible combinations of the list of entities. Forexample, the phrase “X, Y, and/or Z” covers the following embodiments:(1) only X; (2) only Y; (3) only Z; (4) X and Y; (5) X and Z; (6) Y andZ; and (7) X, Y, and Z.

According to one definition, a computer is any device that is capable ofperforming computations. In some embodiments, a computer can include aprocessing mechanism that is capable of executing instructions stored ona storage medium. Examples of computers include, but are not limited to,smartphones, handheld computers, laptop computers, desktop computers,distributed computers, printers, appliances, etc.

According to one definition, a network is a set of one or moreinterconnected devices that is capable of delivering information fromone computer to another computer. Examples of networks include, but arenot limited to, wireless and wired networks, local area networks (LANs),metropolitan area networks (MANs), WANs, private networks, publicnetworks, intranets, internets, etc.

Communication between two nodes of a network is typically accomplishedusing a layered software architecture, which is often referred to as anetworking software stack or simply a networking stack. As is true ofany data processing function, a given functionality in a networkingstack can be implemented using hardware or software or a combinationthereof. The decision to implement a specific functionality in hardwareor software is typically based on a tradeoff between performance andcost.

Each layer is usually associated with one or more protocols which definethe rules and conventions for processing packets in that layer. Eachlower layer performs a service for the layer immediately above it tohelp with processing packets, and each layer typically adds a header(control data) that allows peer layers to communicate with one another.At the sender, this process of adding layer specific headers is usuallyperformed at each layer as the payload moves from higher layers to lowerlayers. The receiving host generally performs the reverse of thisprocess by processing headers of each layer as the payload moves fromthe lowest layer to the highest layer.

A data link layer (or link layer for short) can be defined as a layerthat manages a communication channel between adjacent communicationdevices. For example, if two routers are connected to each other via acable, then the link layer would typically manage the communicationchannel between these two routers. The Ethernet layer is an example of alink layer. A network layer can be defined as a layer that enablescommunication between any two devices across the network. For example,the Internet Protocol (IP) layer is an example of a network layer thatenables communication between two routers in an IP network.

FIG. 1A illustrates an example of a network in accordance with someembodiments described herein. Although some of the examples described inthis disclosure are in the context of a WAN, the disclosed systems andtechniques can generally be used to improve performance of any type ofnetwork.

Client site 122 can be a company's headquarters or a company's regionaloffice, and can include one or more clients 102-104, routers 106, 110,112, and 114, and WAN optimization device 108 that are connected to eachother as shown in FIG. 1A. Data center 124 can host servers and datastorage systems (not shown in FIG. 1A) for the company's enterprisenetwork, and include WAN optimization device 126. Data center 124 may bereachable via network 116.

WAN optimization device 108 can establish a connection with WANoptimization device 126, and can use the connection to optimize at leastsome communications between clients in client site 122 and servers indata center 124. For example, WAN optimization devices 108 and 126 canintercept a connection between a client at client site 122 and a serverat data center 124 and establish the following two local connections: afirst local connection between the client and WAN optimization device108, and a second local connection between the server and WANoptimization device 126. The interception may be performedtransparently, i.e., the client and server may communicate with eachother as if they had established an end-to-end connection withoutrealizing that, in fact, the end-to-end connection was split intomultiple connections by WAN optimization devices 108 and 126.

WAN optimization devices 108 and 126 can then use the threeconnections—the connection between the two WAN optimization devices andthe two local connections—to optimize communications between clients inclient site 122 and servers in data center 124. For example, data sentby a client to a server can be received at WAN optimization device 108.Next, WAN optimization device 108 can transform the data (e.g., byperforming de-duplication) and send the transformed data to WANoptimization device 126. The transformation can significantly reduce thesize of the data, thereby reducing the amount of bandwidth required tocommunicate the data over network 116. WAN optimization device 126 canthen perform an inverse transformation to recover the original data. Therecovered original data can then be sent from WAN optimization device126 to a server in data center 124 Likewise, in the return path (i.e.,when a server sends data back to a client), the data can be transformedby WAN optimization device 126 and the original data can be subsequentlyrecovered by WAN optimization device 108.

In addition to reducing the amount of bandwidth required forcommunicating data over network 116, WAN optimization devices 108 and126 can also reduce latency by, for example, performing intelligentprefetching. Specifically, WAN optimization device 108 can intelligentlyprefetch data from a server in data center 126 and provide the data to aclient when a request for the data from the client is intercepted.Performing intelligent prefetching can significantly reduce latencybecause the round trip time from the client to WAN optimization device108 can be significantly smaller than the round trip time from theclient to data center 124.

In a conventional network configuration, all traffic from client site122 is first routed to data center 124 via network 116, and any trafficthat needs to outside the enterprise network then exits the enterprisenetwork at data center 124, e.g., via a firewall. In such networkconfigurations the traffic load on network 116 can become very high ifclients in client site 122 access cloud computing services that arehosted outside the enterprise network.

Therefore, to reduce network operations costs, the network configurationshown in FIG. 1A may be used in which cloud computing provider 132 isreachable via network 120 that is connected to router 114 at client site122, and cloud computing provider 128 is reachable via network 118 thatis connected to router 112 at client site 122. Cloud computing providers128 and 132 may provide cloud computing services on servers 130 and 134,respectively. In such network configurations, the traffic betweenclients 102-104 and cloud computing providers 128 and 132 needs to berouted differently from the traffic between clients 102-104 and serversin data center 124.

Many other network configurations will be apparent to a person havingordinary skill in the art. For example, FIG. 1B illustrates anotherexample of a network in accordance with some embodiments describedherein. The difference between FIG. 1A and FIG. 1B is that, in FIG. 1B,router 136 is connected to WAN optimization device 108, and router 136is then connected to routers 110, 112, and 114. In some embodiments,other network paths (shown using dashed lines in FIG. 1A and 1B) mayalso exist between networks 116, 118, and 120. In some embodiments,networks 116, 118, and 120 may be sub-networks of a larger network,while in other embodiments, networks 118 and 120 may be the samenetwork. Furthermore, the number and types of devices shown in FIGS.1A-1B are for illustration purposes only and are not intended to limitthe scope of this disclosure.

Some embodiments described in this disclosure provide systems andtechniques for transparently intercepting network flows, identifying anapplication that is associated with the network flow using deep packetinspection, and then forwarding the traffic of different network flows(and therefore of different applications) over different paths based ona path selection policy. For example, some embodiments described in thisdisclosure can route traffic that is destined to a cloud computingprovider 132 via router 114 instead of the traffic first being routed todata center 124 and then being routed to cloud computing provider 132.Some systems and techniques for path selection are now described.

Path Selection

FIG. 2A illustrates a process for path selection in accordance with someembodiments described herein. The process can begin by transparentlyintercepting a packet at an intermediary device that is located betweena source device and a first destination device, wherein a header of thepacket includes a link layer source address associated with the sourcedevice and a first link layer destination address associated with thefirst destination device (operation 202). For example, in FIG. 1A, WANoptimization device 108 can be the intermediary device that is locatedbetween a source device, i.e., router 106, and a destination device,i.e., router 110. Next, the process can determine if the packet is to beforwarded to a second destination device (operation 204). If so, thefirst link layer destination address can be replaced with a second linklayer destination address associated with the second destination device(operation 206), and the packet can be forwarded to the firstdestination device (operation 208). Otherwise, the packet can beforwarded to the first destination device (operation 210).

FIG. 2B illustrates a process for path selection in accordance with someembodiments described herein. The process can begin by transparentlyintercepting a packet at an intermediary device that is located betweena source device and a destination device, wherein a link layer header ofthe packet includes a link layer source address associated with thesource device and a link layer destination address associated with thedestination device, and wherein a routing table at the destinationdevice forwards the packet along a first path (operation 252). Forexample, in FIG. 1B, WAN optimization device 108 can be the intermediarydevice that is located between a source device, i.e., router 106, and adestination device, i.e., router 136. Next, the process can determine ifthe packet is to be forwarded along a second path (operation 254). Ifso, one or more bits in a network layer header of the packet can bemodified (operation 256), and the packet can be forwarded to thedestination device, thereby causing the destination device to forwardthe packet along the second path instead of the first path (operation258). Otherwise, the packet can be forwarded to the destination device(operation 260).

Path selection can be used in many scenarios. For example, pathselection can be used to route traffic associated with differentapplications along different paths. In some embodiments, path selectioncan be used to quickly switch to a backup path if a fault is detected ina primary path. Specifically, a WAN optimization device can periodicallysend probe messages along multiple paths, and if a fault is detected ina path that is currently being used to route traffic for a network flow,then the network flow can be switched over to a different path that doesnot have a fault.

In some embodiments, the WAN optimization device (or another device inthe network) can analyze packets to determine a path over which thepackets are to be routed. For example, the payload of the packet can beanalyzed to identify an application (e.g., an email application or acloud document editing application) that is associated with the packet.Next, the WAN optimization device can use a policy to determine how toroute packets that are associated with the identified application (e.g.,the policy may specify that the traffic associated with application A1is to be routed through router R1, and all other traffic is to be routedthrough the default router R2). The WAN optimization device can thendetermine a network flow associated with the packet. In some embodimentsa network flow may be defined using one or more of the following fields:source IP address (or more generally, a network layer source address),source port number (or more generally, a transport layer sourceidentifier), destination IP address (or more generally, a network layerdestination address), and destination port number (or more generally, atransport layer destination identifier). This example of a network flowhas been provided for illustration purposes only and is not intended tolimit the scope of the embodiments to the forms disclosed.

Next, the WAN optimization device can store an association between thenetwork flow and the path (or route) that was determined based on thepolicy. Subsequently, all packets for the network flow can be routedalong the path that was determined based on the policy. (Note thatdetermining the network flow of a packet usually requires considerablyless computation than analyzing the payload of a packet to identify anapplication associated with the packet.)

The path selection policy can be specified by a user. For example, theuser can specify that packets (and therefore the network flow that isassociated with the packets) that have a particular signature are to berouted to a particular IP address (or a domain name). The WANoptimization device can use this information to determine the next hoprouter through which the packet is to be routed, and modify packetheader information (if required) to ensure that the packet is routed inaccordance with the policy.

In some embodiments, the device that performs deep packet inspection(i.e., the device that analyzes the payload of a packet to determine theapplication associated with the packet) and associates a network flowwith a particular path based on a user-specified policy can be differentfrom the device that modifies the packet header information toeffectuate path selection. For example, in FIG. 1A, suppose WANoptimization device is merely a path selection device that is capable ofmodifying packet header information to effectuate path selection, but isnot capable of performing deep packet inspection. In this case, anotherdevice (not shown in FIG. 1A) may perform deep packet inspection andapply the user-defined policy, and provide the results, e.g., a mappingof network flows to next-hop routers, to the path selection device. Thepath selection device can then perform path selection in accordance withthe policy by routing network flows based on the mapping.

FIG. 3A illustrates an example of path selection in accordance with someembodiments described herein. The example shown in FIG. 3A cancorrespond to the network configuration shown in FIG. 1A. Specifically,router 302, WAN optimization device 304, router 306, and router 308 inFIG. 3A can correspond to router 106, WAN optimization device 108,router 110, and router 112, respectively, in FIG. 1A.

In FIG. 3A, port P1 (having link layer address MAC1) is connected toport P4 of WAN optimization device 304. Ports P5 and P6 of WANoptimization device 304 are connected to port P2 (having link layeraddress MAC2) of router 306 and port P3 (having link layer address MAC3)of router 308, respectively. WAN optimization device 304 is transparentto routers 302, 306, and 308 at the link layer. In other words, whenrouter 302 sends a link layer packet (e.g., an Ethernet packet) torouter 306, router 302 does not know that WAN optimization device 304 isbetween router 302 and router 306. Therefore, when router 302 sends alink layer packet to router 306, router 302 sets the destination linklayer address in the link layer packet to MAC2.

FIG. 3B illustrates a packet in accordance with some embodimentsdescribed herein. Packet 350 can include a number of fields.Specifically, packet 350 can include link layer destination addressMAC2, link layer source address MAC1, and payload data 352. The payloadin a packet is the data that is desired to be communicated to the finaldestination of the packet (note that router 306 may not be the finaldestination of packet 350). For example, payload 352 may include aportion of an email or a document. WAN optimization device cantransparently intercept packet 350, analyze the data in packet 350(i.e., any part of packet 350—header and/or payload), and determinewhether or not packet 350 needs to be sent along a different path.

In some embodiments, WAN optimization device 304 can analyze payload 352to determine whether or not packet 350 needs to be sent along adifferent path. Specifically, WAN optimization device 304 can generate afingerprint based on payload 352, and match the fingerprint against adatabase of known fingerprints to identify an application that generatedthe packet. Next, WAN optimization device 304 can use a policy (whichcan be a user-defined policy) to determine whether or not packets thatoriginate from the identified application are to be forwarded (orrouted) along a path that is different from the path that the packetwould normally have been forwarded (or routed) based on the forwarding(or routing) tables in the network.

In any case, if WAN optimization device 304 determines that the packetdoes not require special handling, then the packet can be sent to router306 without changing the destination link-layer address. On the otherhand, if WAN optimization device 304 determines that the packet needsspecial handling, then WAN optimization device 304 can modify one ormore bits in the header of the packet, and send the packet through anappropriate output port of WAN optimization device 304. For example, ifWAN optimization device 304 determines that packet 350 is to be sent torouter 308 instead of router 306, then WAN optimization device 304 canreplace the link-layer destination address MAC2 (which corresponds torouter 306) in packet 350 with the link-layer destination address MAC3(which corresponds to router 308). WAN optimization device 304 can thensend the packet with the replaced link-layer destination address (shownas packet 354 in FIG. 3B) to router 308 via port P6.

FIG. 3C illustrates an example of path selection in accordance with someembodiments described herein. The example shown in FIG. 3C cancorrespond to the network configuration shown in FIG. 1B. Specifically,router 302, WAN optimization device 304, router 310, router 306, androuter 308 in FIG. 3C can correspond to router 106, WAN optimizationdevice 108, router 136, router 110, and router 112, respectively, inFIG. 1B.

In FIG. 3C, port P1 (having link layer address MAC1) is connected toport P4 of WAN optimization device 304. Port P5 of WAN optimizationdevice 304 is connected to port P7 (having link layer address MAC7) ofrouter 310. WAN optimization device 304 is transparent to routers 302and 310 at the link layer. In other words, when router 302 sends a linklayer packet (e.g., an Ethernet packet) to router 310, router 302 doesnot know that WAN optimization device 304 is between router 302 androuter 310. Therefore, when router 302 sends a link layer packet torouter 310, router 302 sets the destination link layer address in thelink layer packet to MAC7.

FIG. 3D illustrates a packet in accordance with some embodimentsdescribed herein. As before, packet 360 can include a number of fields.Specifically, packet 360 can include link layer destination addressMAC7, link layer source address MAC1, and payload data 362. WANoptimization device can transparently intercept packet 360, analyze thedata in packet 360 (i.e., any part of packet 360—header and/or payload),and determine whether or not packet 360 needs to be sent along adifferent path.

In any case, if WAN optimization device 304 determines that the packetdoes not require special handling, then the packet can be sent to router310 without changing any network layer header fields in the header. Onthe other hand, if WAN optimization device 304 determines that thepacket needs special handling, then WAN optimization device 304 canmodify one or more bits in a header (e.g., network layer header) ofpacket 360, and send the packet to router 310. For example, if WANoptimization device 304 determines that packet 360 is to be sent torouter 308 instead of router 306, then WAN optimization device 304 canmodify one or more bits in packet 360 (shown in FIG. 3D as modifyingDSCP1 to DSCP2). WAN optimization device 304 can then send the packetwith the modified header bits (shown as packet 364 in FIG. 3D) to router310 via port P5. The modified header bits in the packet can then causerouter 310 to forward (or route) the packet to router 308 insteadforwarding (or routing) the packet to router 306. Specifically, in someembodiments, WAN optimization device 304 can modify the DSCP bits (whichare part of the DS field) in the IP header, and router 310 can beconfigured to use the DSCP bits while routing packets.

FIG. 4 illustrates an apparatus in accordance with some embodimentsdescribed herein. Apparatus 402 comprises processor 404, memory 406(e.g., a volatile or non-volatile random access memory), and storage 408(e.g., a flash memory device or a disk drive). Storage 408 can storeexecutable 410, operating system 412, and data 414. Apparatus 402 alsoincludes switching logic 416 and set of network interfaces 418. Thecomponents in apparatus 402 can communicate with one another using acommunication mechanism, e.g., a bus, a backplane, and/or a switchingfabric.

Executable 410 can include instructions that, when executed by processor404, cause apparatus 402 to perform one or more methods that areimplicitly or explicitly described in this disclosure. Data 414 caninclude any data that is inputted into or outputted by executable 410.Set of network interfaces 418 can be used to transmit data to and/orreceive data from other communication devices. Switching logic 416 canforward network traffic received on one or more network interfaces inaccordance with switching/forwarding/routing information stored inapparatus 402.

The above description is presented to enable any person skilled in theart to make and use the embodiments. Various modifications to thedisclosed embodiments will be readily apparent to those skilled in theart, and the general principles defined herein are applicable to otherembodiments and applications without departing from the spirit and scopeof the present disclosure. Thus, the present invention is not limited tothe embodiments shown, but is to be accorded the widest scope consistentwith the principles and features disclosed herein.

The data structures and code described in this disclosure can bepartially or fully stored on a non-transitory computer-readable storagemedium and/or a hardware module and/or hardware apparatus. Anon-transitory computer-readable storage medium includes allcomputer-readable storage mediums with the sole exception of apropagating electromagnetic wave or signal. Specifically, anon-transitory computer-readable storage medium includes, but is notlimited to, volatile memory, non-volatile memory, magnetic and opticalstorage devices such as disk drives, magnetic tape, CDs (compact discs),DVDs (digital versatile discs or digital video discs), or other media,now known or later developed, that are capable of storing code and/ordata. Hardware modules or apparatuses described in this disclosureinclude, but are not limited to, application-specific integratedcircuits (ASICs), field-programmable gate arrays (FPGAs), dedicated orshared processors, and/or other hardware modules or apparatuses nowknown or later developed.

The methods and processes described in this disclosure can be partiallyor fully embodied as code and/or data stored in a non-transitorycomputer-readable storage medium or device, so that when a computersystem reads and executes the code and/or data, the computer systemperforms the associated methods and processes. The methods and processescan also be partially or fully embodied in hardware modules orapparatuses. Note that the methods and processes can be embodied using acombination of code, data, and hardware modules or apparatuses.

The foregoing descriptions of embodiments of the present invention havebeen presented only for purposes of illustration and description. Theyare not intended to be exhaustive or to limit the present invention tothe forms disclosed. Accordingly, many modifications and variations willbe apparent to practitioners skilled in the art. Additionally, the abovedisclosure is not intended to limit the present invention. The scope ofthe present invention is defined by the appended claims.

What is claimed is:
 1. A method for configuring path selection in anetwork, wherein the network comprises a first router, a second router,a third router, a fourth router, and an intermediary device, wherein theintermediary device is interposed between the first router and thesecond router, wherein the third router and the fourth router arecoupled to the second router, and wherein the method comprising:configuring the second router to use Differentiated Services Code Point(DSCP) while routing packets so that packets with a first DSCP value arerouted through the third router, and packets with a second DSCP valueare routed through the fourth router; and configuring the intermediarydevice to: transparently intercept a packet forwarded by the firstrouter to the second router, determine whether the packet is to berouted through the third router or the fourth router, modify a DSCPfield in the packet based on said determining, and forward the packet tothe second router.
 2. The method of claim 1, wherein modifying the DSCPfield in the packet comprises: setting the DSCP field in the packet tothe first DSCP value responsive to determining that the packet is to berouted through the third router, and setting the DSCP field in thepacket to the second DSCP value responsive to determining that thepacket is to be routed through the fourth router.
 3. The method of claim1, wherein determining whether the packet is to be routed through thethird router or the fourth router comprises determining that a path thatpasses through the third router has a fault.
 4. The method of claim 3,further comprising: periodically sending probe packets through multiplepaths; and flagging a path as having a fault if a response to a probepacket includes an error message or if no response is received to theprobe packet within a predetermined time period.
 5. The method of claim1, wherein determining whether the packet is to be routed through thethird router or the fourth router comprises: determining a network flowassociated with the packet; and using a path selection table todetermine a path for the packet based on the network flow associatedwith the packet.
 6. The method of claim 5, further comprising creatingthe path selection table based on a path selection policy thatassociates at least two different applications with two different pathsin the network.
 7. A non-transitory computer-readable storage mediumstoring instructions that, when executed by a computer, cause thecomputer to perform a method for configuring path selection in anetwork, wherein the network comprises a first router, a second router,a third router, a fourth router, and an intermediary device, wherein theintermediary device is interposed between the first router and thesecond router, wherein the third router and the fourth router arecoupled to the second router, and wherein the method comprising:configuring the second router to use Differentiated Services Code Point(DSCP) while routing packets so that packets with a first DSCP value arerouted through the third router, and packets with a second DSCP valueare routed through the fourth router; and configuring the intermediarydevice to: transparently intercept a packet forwarded by the firstrouter to the second router, determine whether the packet is to berouted through the third router or the fourth router, modify a DSCPfield in the packet based on said determining, and forward the packet tothe second router.
 8. The non-transitory computer-readable storagemedium of claim 7, wherein modifying the DSCP field in the packetcomprises: setting the DSCP field in the packet to the first DSCP valueresponsive to determining that the packet is to be routed through thethird router, and setting the DSCP field in the packet to the secondDSCP value responsive to determining that the packet is to be routedthrough the fourth router.
 9. The non-transitory computer-readablestorage medium of claim 7, wherein determining whether the packet is tobe routed through the third router or the fourth router comprisesdetermining that a path that passes through the third router has afault.
 10. The non-transitory computer-readable storage medium of claim9, further comprising: periodically sending probe packets throughmultiple paths; and flagging a path as having a fault if a response to aprobe packet includes an error message or if no response is received tothe probe packet within a predetermined time period.
 11. Thenon-transitory computer-readable storage medium of claim 7, whereindetermining whether the packet is to be routed through the third routeror the fourth router comprises: determining a network flow associatedwith the packet; and using a path selection table to determine a pathfor the packet based on the network flow associated with the packet. 12.The non-transitory computer-readable storage medium of claim 11, furthercomprising creating the path selection table based on a path selectionpolicy that associates at least two different applications with twodifferent paths in the network.
 13. An apparatus, comprising: aprocessor; and a non-transitory storage medium storing instructionsthat, when executed by the processor, cause the apparatus to perform amethod for configuring path selection in a network, wherein the networkcomprises a first router, a second router, a third router, a fourthrouter, and an intermediary device, wherein the intermediary device isinterposed between the first router and the second router, wherein thethird router and the fourth router are coupled to the second router, andwherein the method comprising: configuring the second router to useDifferentiated Services Code Point (DSCP) while routing packets so thatpackets with a first DSCP value are routed through the third router, andpackets with a second DSCP value are routed through the fourth router;and configuring the intermediary device to: transparently intercept apacket forwarded by the first router to the second router, determinewhether the packet is to be routed through the third router or thefourth router, modify a DSCP field in the packet based on saiddetermining, and forward the packet to the second router.
 14. Theapparatus of claim 13, wherein modifying the DSCP field in the packetcomprises: setting the DSCP field in the packet to the first DSCP valueresponsive to determining that the packet is to be routed through thethird router, and setting the DSCP field in the packet to the secondDSCP value responsive to determining that the packet is to be routedthrough the fourth router.
 15. The apparatus of claim 13, whereindetermining whether the packet is to be routed through the third routeror the fourth router comprises determining that a path that passesthrough the third router has a fault.
 16. The apparatus of claim 15,further comprising: periodically sending probe packets through multiplepaths; and flagging a path as having a fault if a response to a probepacket includes an error message or if no response is received to theprobe packet within a predetermined time period.
 17. The apparatus ofclaim 13, wherein determining whether the packet is to be routed throughthe third router or the fourth router comprises: determining a networkflow associated with the packet; and using a path selection table todetermine a path for the packet based on the network flow associatedwith the packet.
 18. The apparatus of claim 17, further comprisingcreating the path selection table based on a path selection policy thatassociates at least two different applications with two different pathsin the network.